package com.dh.testsjsx;

public class Book extends A{
    public static void main(String[] args)    {
        A book=new Book();
        System.out.println(book.i);
        System.out.println("Hello ShuYi.");
        book.a();
    }

    Book()
    {
        System.out.println("书的构造方法");
        System.out.println("price=" + price +",amount=" + amount);
    }

    {
        System.out.println("书的普通代码块");
    }    int price = 110;
    static
    {
        System.out.println("书的静态代码块");
    }
    static int amount = 112;
    public static void   a(){
        System.out.println("bbb");
    }
}
class A{
    public int i=11;
    public A(){
        System.out.println("父类构造方法");
    }
    static {
        System.out.println("父类静态代码块");
    }
    public static void   a(){
        System.out.println("aaa");
    }
}
